<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>${baseInfo.tableComment}基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<#noparse>${ctx}</#noparse>/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="<#noparse>${ctx}</#noparse>/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="<#noparse>${ctx}</#noparse>/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "<#noparse>${ctx}</#noparse>";
    </script>
</head>
<body class="listBody qbdms-particulars">
<div class="qbdms-bodyDiv">
    <div class="layui-table-view-body qbdms-add-view-body">
        <div class="qbdms-formTitle">${baseInfo.tableComment} <i class="qbdms-returnOn closeWindow">返回</i></div>
        <form class="layui-form formPreview" requrl="<#noparse>${ctx}</#noparse>/${baseInfo.moduleName}/${baseInfo.classForPrefix}/get" lay-filter="${baseInfo.classForPrefix}DataForm">
            <div class="" style="width: 100%;">
                <table class="tableExcel qbdms-zeroTable" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr id="tbxx"></tr>
                        <#assign colIndex=0>
                        <#assign index=0>
                        <#assign rowSize=codeGenConf.rowSize>
                        <#assign colSize=codeGenConf.colSize>
                        <#assign columnSize=codeGenConf.columnSize>
                        <#list 0..rowSize-1 as i>
                        <tr>
                            <#list 0..columnSize as col>
                                <td class="qbdms-zeroTable-lable">${baseInfo.showColumns[index].columnComment!}</td>
                                <td name="${baseInfo.showColumns[index].attrNameForProperty}"></td>
                                <#assign lastData=index == columnSize -1>
                                <#assign index=index+1>
                                <#assign colIndex=colIndex+1>
                                <#if colIndex % colSize == 0><#break /></#if>
                                <#if lastData><#break /></#if>
                            </#list>
                        </tr>
                        </#list>
                    </tbody>
                </table>
                <#assign colIndex=0>
                <#assign index=0>
                <#assign rowSize=codeGenConf.rowSize>
                <#assign colSize=codeGenConf.colSize>
                <#assign columnSize=codeGenConf.columnSize>
                <#list 0..rowSize-1 as i>
                    <#list 0..columnSize as col>
                        <#if baseInfo.showColumns[index].attrType?? && baseInfo.showColumns[index].attrType == 'Date'>
                            <input name="${baseInfo.showColumns[index].attrNameForProperty}" type="hidden" placeholder="未填写" autocomplete="off" class="layui-input dateTimeFiled input-right time-init" format="yyyy-MM-dd" datetype="date" />
                        </#if>
                        <#assign lastData=index == columnSize -1>
                        <#assign index=index+1>
                        <#assign colIndex=colIndex+1>
                        <#if colIndex % colSize == 0>
                            <#break />
                        </#if>
                        <#if lastData>
                            <#break />
                        </#if>
                    </#list>
                </#list>
            </div>
            <div class="layui-form-item btnformItem">
                <p>
                    <button type="reset" id="closeWindow" class="layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">返回</button>
                </p>
            </div>
        </form>
    </div>
</div>
<script src="<#noparse>${ctx}</#noparse>/qbdmsStatic/public/configFile.js"></script>
<script src="<#noparse>${ctx}</#noparse>/layui/layui.js"></script>
<script>
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'setter', 'layer', 'propsHandle', 'upload', 'common', 'laydate', 'jquery', 'publicMethods', 'qbdmsForm'], function () {
        // -----常量声明----------
        var $ = layui.jquery,
            laydate = layui.laydate,
            setter = layui.setter,  // 配置信息
            layer = layui.layer,
            common = layui.common,
            propsHandle = layui.propsHandle,
            upload = layui.upload,
            publicMethods = layui.publicMethods,
            formId = '${formDefId}' || '',
            form = layui.qbdmsForm;
        $(".subContTem").hide()

        var defProps = {
            //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
            viewMould: 'moulds/', // 组件模块 存放文件 *****
            selectorBtn: '.selectorBtn'
        };
        var temQuery = new propsHandle();  // 实例化模板功能部分
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });

        var dateTimeFiledLen = $(".dateTimeFiled");
        for (var i = 0; i < dateTimeFiledLen.length; i++) {
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                , type: 'date'
                , trigger: 'click'
            });
        }
        //关闭当前页面
        <#if baseInfo.selectOpenMode?? && baseInfo.selectOpenMode>
        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        });
        <#else>
        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
            window.location.href ='<#noparse>${ctx}</#noparse>/${baseInfo.moduleName}/${baseInfo.classForPrefix}/view/list';
        });
        </#if>

        var runId = "<#noparse>${runId}</#noparse>";
        if (runId == null || runId == '') {
            $("#hideAndShow").show();
        }

        var common = layui.common;
        common.updateForm({
            name: '${baseInfo.classForPrefix}DataForm',
            idValue: "<#noparse>${</#noparse>${baseInfo.primaryKey.attrNameForProperty}}",
            primary: "${baseInfo.primaryKey.attrNameForProperty}"
        });
    });
</script>
</body>
</html>